import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/4/11 8:38
 * 美国节日
 * 分解因数
 */
public class Day31 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int num =scanner.nextInt();
            solution(num);
            System.out.println();
        }
    }
    public static void solution(int num){
        System.out.print(num +" =");
        for (int i = 2; i <= Math.sqrt(num); i++) {
            while (num != i){
                if (num%i==0){
                    System.out.print(" " +  i +" *");
                    num/=i;
                }else {
                    break;
                }
            }
        }
        System.out.print(" "+num);
    }
//----------------------------------------------
    public  static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    public  static  Calendar calendar = Calendar.getInstance();

    public static void main1(String[] args) throws ParseException {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int year  = scanner.nextInt();
            solution1(year);
            System.out.println();
        }
    }
    //-------------------------------------- 做不出
    public static void solution1(int year) throws ParseException {
        newYear(year);
        marDinDay(year);
        boss(year);
        dead(year);
        country(year);
        laoDong(year);
        ganEn(year);
        birth(year);
    }
    public static int dayOfMonth(int year,int month,int count,int dayWeek) throws ParseException {
        Date date = simpleDateFormat.parse(year +"-"+ month+"-1");
        calendar.setTime(date);
        int week = calendar.get(Calendar.DAY_OF_WEEK)-1;
        int day = 1 + (count - 1) * 7 + (7 + dayWeek - week) % 7;
        return day;
    }
    public static void newYear(int year){
        System.out.println(year+"-01-01");
    }
    public static void country(int year){
        System.out.println(year+"-07-04");
    }
    public static void birth(int year){
        System.out.println(year+"-12-25");
    }
    public static void marDinDay(int year) throws ParseException {
        int month = 1;
        int count = 3;
        int dayWeek = 1;
        int day = dayOfMonth(year,month,count,dayWeek);
        System.out.println(simpleDateFormat.parse(year + "-" + month + "-"+ day));

    }
    public static void boss(int year) throws ParseException {
        int month = 2;
        int count = 3;
        int dayWeek = 1;
        int day = dayOfMonth(year,month,count,dayWeek);
        System.out.println(simpleDateFormat.parse(year + "-" + month + "-"+ day));
    }
    public static void dead(int year) throws ParseException {
        int month = 6;

        Date date = simpleDateFormat.parse(year +"-"+ month+"-1");
        calendar.setTime(date);
        int week = calendar.get(Calendar.DAY_OF_WEEK)-1;
        int day = 31 - ((week == 1) ? 6 : (week - 2));
        System.out.println(simpleDateFormat.parse(year + "-" + "5" + "-"+ day));
    }
    public static void laoDong(int year) throws ParseException {
        int month = 9;
        int count = 1;
        int dayWeek = 1;
        int day = dayOfMonth(year,month,count,dayWeek);
        System.out.println(simpleDateFormat.parse(year + "-" + month + "-"+ day));
    }
    public static void ganEn(int year) throws ParseException {
        int month = 11;
        int count = 4;
        int dayWeek = 4;
        int day = dayOfMonth(year,month,count,dayWeek);
        System.out.println(simpleDateFormat.parse(year + "-" + month + "-"+ day));
    }
}
